const routes = [{
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/home/index.vue'),
    meta: {
      index: 1,
      showNav: true,
      til: "首页"
    }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login/index.vue'),
    meta: {
      showNav: false,
      til: "登录",
      index: 1
    }
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/about/index.vue'),
    meta: {
      showNav: false,
      til: "关于我们",
      index: 2
    }
  },
  {
    path: '/category',
    name: 'category',
    component: () => import('../views/category/index.vue'),
    meta: {
      showNav: true,
      til: "分类",
      index: 1
    }
  },
  {
    path: '/category',
    name: 'category',
    component: () => import('../views/category/index.vue'),
    meta: {
      showNav: true,
      til: "分类",
      index: 1
    }
  },
  {
    path: '/product/:id',
    name: 'product',
    component: () => import('../views/productInfo/index.vue'),
    meta: {
      showNav: false,
      til: "商品详情",
      index: 3
    }
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import('../views/cart/index.vue'),
    meta: {
      showNav: true,
      til: "购物车",
      index: 1
    }
  },
  {
    path: '/order',
    name: 'order',
    component: () => import('../views/order/index.vue'),
    meta: {
      showNav: false,
      til: "生成订单",
      index: 2
    }
  },
  {
    path: '/user',
    name: 'user',
    component: () => import('../views/user/index.vue'),
    meta: {
      showNav: true,
      til: "我的",
      index: 1
    }
  }
]
export default routes